package cn.net.msg.service;

import java.util.HashMap;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import cn.net.msg.dao.TbMoodDao;
import cn.net.msg.model.TbMood;
import cn.net.msg.service.base.Order;

@Component("tbMoodService")
public class TbMoodService {

    @Resource(name = "tbMoodDao")
    private TbMoodDao dao;

    @Transactional
    public List<TbMood> getMoodForList(int firstIndex,
            int maxResult,Order order, String propertyName){
        return dao.getMoodForList(firstIndex, maxResult, order, propertyName);
    }

    @Transactional
    public void addMood(TbMood tbMood){
        dao.addMood(tbMood);
    }

    @Transactional
    public void addMoodPraise(TbMood tbMood){
        dao.addMoodPraise(tbMood);
    }

    @Transactional
    public void addMoodBelittle(TbMood tbMood){
        dao.addMoodBelittle(tbMood);
    }

    @Transactional
    public List<TbMood> getUserMoodForList(int firstIndex,
            int maxResult,List<HashMap<String,Object>> queryParams, Order order, String propertyName){
        return dao.getUserMoodForList(firstIndex, maxResult, queryParams, order, propertyName);
    }
}
